package game

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type GameServerRouter struct {}

// InitGameServerRouter 初始化 gameServer表 路由信息
func (s *GameServerRouter) InitGameServerRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	gameServerRouter := Router.Group("gameServer").Use(middleware.OperationRecord())
	gameServerRouterWithoutRecord := Router.Group("gameServer")
	gameServerRouterWithoutAuth := PublicRouter.Group("gameServer")

	var gameServerApi = v1.ApiGroupApp.GameApiGroup.GameServerApi
	{
		gameServerRouter.POST("createGameServer", gameServerApi.CreateGameServer)   // 新建gameServer表
		gameServerRouter.DELETE("deleteGameServer", gameServerApi.DeleteGameServer) // 删除gameServer表
		gameServerRouter.DELETE("deleteGameServerByIds", gameServerApi.DeleteGameServerByIds) // 批量删除gameServer表
		gameServerRouter.PUT("updateGameServer", gameServerApi.UpdateGameServer)    // 更新gameServer表
	}
	{
		gameServerRouterWithoutRecord.GET("findGameServer", gameServerApi.FindGameServer)        // 根据ID获取gameServer表
		gameServerRouterWithoutRecord.GET("getGameServerList", gameServerApi.GetGameServerList)  // 获取gameServer表列表
	}
	{
	    gameServerRouterWithoutAuth.GET("getGameServerPublic", gameServerApi.GetGameServerPublic)  // 获取gameServer表列表
	}
}
